import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/login'
  },
  {
    path: '/login',
    component: () => import('../views/Login'),
  },
  {
    path: '/home',
    component: () => import(/* webpackChunkName: "about" */ '../views/Home.vue'),
    children: [
      {
        path: '/home',
        redirect: '/home/first'
      },
      {
        path: '/home/first',
        component: () => import(/* webpackChunkName: "about" */ '../views/First'),
      },
      {
        path: '/home/room',
        component: () => import(/* webpackChunkName: "about" */ '../views/Room'),
      },
      {
        path: '/home/my',
        component: () => import(/* webpackChunkName: "about" */ '../views/My'),
      },
      {
        path: '/home/first/lend',
        component: () => import(/* webpackChunkName: "about" */ '../views/Lend'),
      }
    ]
  },
  {
    path: '/myrent',
    component: () => import(/* webpackChunkName: "about" */ '../views/Myrent'),
  },
  {
    path:'/citylist',
    component: () => import(/* webpackChunkName: "about" */ '../views/Citylist'),
  },
  {
    path: '/home/first/map',
    component: () => import(/* webpackChunkName: "about" */ '../views/Map'),
  },
  {
    path:'/publish',
    component: () => import(/* webpackChunkName: "about" */ '../views/Publish'),
  },
  {
    path:'/search',
    component: () => import(/* webpackChunkName: "about" */ '../views/Search'),
  },
  {
    path:'/history',
    component: () => import(/* webpackChunkName: "about" */ '../views/History'),
  },
  {
    path:'/detail',
    component: () => import(/* webpackChunkName: "about" */ '../views/Detail'),
  },
  {
    path:'/personal',
    component: () => import(/* webpackChunkName: "about" */ '../views/Personal'),
  }
  // {
  //   path: '/home/first/rent',
  //   component: () => import(/* webpackChunkName: "about" */ '../views/Rent'),
  // },
  // {
  //   path: '/home/first/joint',
  //   component: () => import(/* webpackChunkName: "about" */ '../views/Joint'),
  // }
]

const router = new VueRouter({
  routes
})

export default router
